
import falcon
from .toolbox import SD_TOOLBOX

class DemoResource(object):

    # def __init__(self, storage_path):
    #     self.storage_path = storage_path

    def on_get(self, req, resp):

        sql = 'select * from auth_user where id = %s', ('1',)

        #调用  soffeedesion 工具类
        val = SD_TOOLBOX.init_new_order(sql)
        print(val)

        resp.media = '100'

        resp.status = falcon.HTTP_200

    def on_post(self, req, resp):

        id = req.get_param('id')

        resp.media = {
            'dat' : id
        }
        resp.status = falcon.HTTP_200




